﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Trans.member
{
    public partial class Select_master : Form
    {
        private int depart_id;
        public int Depart_id
        {
            set{
                depart_id = value;
            }
        }
        public bool HasSelected
        {
            get{
                return gv_members.SelectedRows.Count > 0;
            }
        }
        public int Id
        {
            get{
                return (int)gv_members.SelectedRows[0].Cells["c_id"].Value;
            }
        }
        public string Name_s
        {
            get{
                return (string)gv_members.SelectedRows[0].Cells["c_name"].Value;
            }
        }
        public Select_master()
        {
            InitializeComponent();
        }

        private void Select_master_Load(object sender, EventArgs e)
        {
            vw_memberTableAdapter.FillByDepart(dataSet_view.vw_member, depart_id);
        }

        private void gv_members_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
        {
            session.Color_Const.set_gv_color(gv_members);
        }
    }
}
